home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / hamradio / tech35.sit / Technician Ham Test / background_4601.txt < prev    next >
Encoding:
Text File  |  1991-04-09  |  9.0 KB  |  397 lines

  1. -- background: 4601 from stack: in
  2. -- bmap block id: 4684
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Test
  6. ----- HyperTalk script -----
  7. On openCard
  8.   global questans, questkey, rightone, group
  9.   hide background button "Correct!"
  10.   hide field review
  11.   set hilight of background button A to false
  12.   set hilight of background button B to false
  13.   set hilight of background button C to false
  14.   set hilight of background button D to false
  15.   get the number of card
  16.   -- ΓÇóΓÇóΓÇó choose question # or card # option
  17.   put "Question #" & group into field "Q#" -- question # option
  18.   -- put "Question #"&it-2 into field "Q#" -- card # option
  19.   put rightone into item group of questkey
  20.   put item group of questans into foo
  21.   if foo is not empty then set hilight of background button foo to true
  22. end openCard
  23.  
  24. on closeCard
  25.   set lockScreen to true
  26.   set hilight of background button A to false
  27.   set hilight of background button B to false
  28.   set hilight of background button C to false
  29.   set hilight of background button D to false
  30.   set lockScreen to false
  31.   hide background button "Correct!"
  32. end closeCard
  33.  
  34. on idle
  35.   global time1
  36.   -- comment out next line (exit idle) if you want a time limit on test.
  37.   -- don't forget to set time limit as described in Exam button of
  38.   -- first card.
  39.   exit idle
  40.   put the seconds into time2
  41.   if time2<time1 then exit idle
  42.   if time2ΓëÑtime1 then
  43.     answer "Too much Time. Try again?" with "OK" or "Quit"
  44.   end if
  45.   if it is "OK" then
  46.     visual effect dissolve to black
  47.     visual effect iris open
  48.     go first card
  49.     openStack
  50.   else
  51.     visual effect dissolve
  52.     go home
  53.   end if
  54. end idle
  55.  
  56. on randomNext
  57.   global group,questlist
  58.   add one to group
  59.   if group > the number of items of questlist then go card report
  60.   get item group of questlist
  61.   go card it
  62. end randomNext
  63.  
  64. on randomPrev
  65.   global group,questlist
  66.   subtract one from group
  67.   if group < 1 then go first card
  68.   get item group of questlist
  69.   go card it
  70. end randomPrev
  71.  
  72. on reView
  73.   global rightone, immediate
  74.   put "Correct answer is " & rightone into field review
  75.   if not immediate then
  76.     wait 3 seconds
  77.     show field review
  78.     wait until the mouseClick
  79.   else
  80.     if hilite of background button rightone is false then
  81.       show field review
  82.       wait until the mouseClick
  83.     else
  84.       -- show background button "Correct!"
  85.     end if
  86.   end if
  87. end reView
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. -- part 1 (field)
  111. -- low flags: 01
  112. -- high flags: 0000
  113. -- rect: left=16 top=70 right=138 bottom=500
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 0
  117. -- font id: 3
  118. -- text size: 10
  119. -- style flags: 0
  120. -- line height: 13
  121. -- part name: Q1
  122.  
  123.  
  124. -- part 11 (field)
  125. -- low flags: 01
  126. -- high flags: 0000
  127. -- rect: left=48 top=137 right=177 bottom=499
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 0 / 0
  130. -- text alignment: 0
  131. -- font id: 3
  132. -- text size: 10
  133. -- style flags: 0
  134. -- line height: 13
  135. -- part name: A
  136.  
  137.  
  138. -- part 25 (button)
  139. -- low flags: 00
  140. -- high flags: 0000
  141. -- rect: left=204 top=313 right=342 bottom=241
  142. -- title width / last selected line: 0
  143. -- icon id / first selected line: 902 / 902
  144. -- text alignment: 1
  145. -- font id: 0
  146. -- text size: 12
  147. -- style flags: 0
  148. -- line height: 16
  149. -- part name: Prev
  150. ----- HyperTalk script -----
  151. on mouseUp
  152.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  153.   -- cards.  Comment out next to last and uncomment last command for
  154.   -- random cards from buildList (in background of first card of stack).
  155.   global immediate, group, questans
  156.   if item group of questans is not empty then
  157.     if immediate then reView
  158.   end if
  159.   visual effect wipe right fast to black
  160.   visual effect wipe left
  161.   -- go to previous card  -- ΓÇóΓÇóΓÇó for sequential cards
  162.   randomPrev -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  163. end mouseUp
  164.  
  165.  
  166. -- part 26 (button)
  167. -- low flags: 00
  168. -- high flags: 0000
  169. -- rect: left=297 top=313 right=342 bottom=333
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 26425 / 26425
  172. -- text alignment: 1
  173. -- font id: 0
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: Next
  178. ----- HyperTalk script -----
  179. on mouseUp
  180.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  181.   -- cards.  Comment out next to last and uncomment last command for
  182.   -- random cards from buildList (in background of first card of stack).
  183.   global immediate, group, questans
  184.   if item group of questans is not empty then
  185.     if immediate then reView
  186.   end if
  187.   visual effect wipe left fast to black
  188.   visual effect wipe right fast
  189.   -- go to next card -- ΓÇóΓÇóΓÇó for sequential cards
  190.   randomNext -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  191. end mouseUp
  192.  
  193.  
  194.  
  195. -- part 27 (field)
  196. -- low flags: 01
  197. -- high flags: 0000
  198. -- rect: left=48 top=178 right=219 bottom=508
  199. -- title width / last selected line: 0
  200. -- icon id / first selected line: 0 / 0
  201. -- text alignment: 0
  202. -- font id: 3
  203. -- text size: 10
  204. -- style flags: 0
  205. -- line height: 13
  206. -- part name: B
  207.  
  208.  
  209. -- part 28 (field)
  210. -- low flags: 01
  211. -- high flags: 0000
  212. -- rect: left=48 top=221 right=262 bottom=508
  213. -- title width / last selected line: 0
  214. -- icon id / first selected line: 0 / 0
  215. -- text alignment: 0
  216. -- font id: 3
  217. -- text size: 10
  218. -- style flags: 0
  219. -- line height: 13
  220. -- part name: C
  221.  
  222.  
  223. -- part 29 (field)
  224. -- low flags: 01
  225. -- high flags: 0000
  226. -- rect: left=47 top=264 right=306 bottom=502
  227. -- title width / last selected line: 0
  228. -- icon id / first selected line: 0 / 0
  229. -- text alignment: 0
  230. -- font id: 3
  231. -- text size: 10
  232. -- style flags: 0
  233. -- line height: 13
  234. -- part name: D
  235.  
  236.  
  237. -- part 20 (field)
  238. -- low flags: 01
  239. -- high flags: 0004
  240. -- rect: left=15 top=31 right=53 bottom=166
  241. -- title width / last selected line: 0
  242. -- icon id / first selected line: 0 / 0
  243. -- text alignment: 0
  244. -- font id: 0
  245. -- text size: 12
  246. -- style flags: 0
  247. -- line height: 16
  248. -- part name: Q#
  249. ----- HyperTalk script -----
  250.  
  251.  
  252.  
  253.  
  254. -- part 36 (button)
  255. -- low flags: 00
  256. -- high flags: 0000
  257. -- rect: left=368 top=305 right=342 bottom=406
  258. -- title width / last selected line: 0
  259. -- icon id / first selected line: 21700 / 21700
  260. -- text alignment: 1
  261. -- font id: 0
  262. -- text size: 12
  263. -- style flags: 0
  264. -- line height: 16
  265. -- part name: Home
  266. ----- HyperTalk script -----
  267. on mouseUp
  268.   visual effect iris close
  269.   go home
  270. end mouseUp
  271.  
  272.  
  273.  
  274.  
  275. -- part 38 (button)
  276. -- low flags: 80
  277. -- high flags: 8002
  278. -- rect: left=173 top=116 right=138 bottom=245
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 0
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: Correct!
  287.  
  288.  
  289. -- part 39 (button)
  290. -- low flags: 00
  291. -- high flags: 8005
  292. -- rect: left=14 top=138 right=174 bottom=44
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 0 / 0
  295. -- text alignment: 1
  296. -- font id: 0
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: A
  301. ----- HyperTalk script -----
  302. on mouseUp
  303.   global questans, group
  304.   set hilight of background button A to true
  305.   set hilight of background button B to false
  306.   set hilight of background button C to false
  307.   set hilight of background button D to false
  308.   put "A" into item group of questans
  309. end mouseUp
  310.  
  311.  
  312.  
  313. -- part 40 (button)
  314. -- low flags: 00
  315. -- high flags: 8005
  316. -- rect: left=14 top=178 right=214 bottom=44
  317. -- title width / last selected line: 0
  318. -- icon id / first selected line: 0 / 0
  319. -- text alignment: 1
  320. -- font id: 0
  321. -- text size: 12
  322. -- style flags: 0
  323. -- line height: 16
  324. -- part name: B
  325. ----- HyperTalk script -----
  326. on mouseUp
  327.   global questans, group
  328.   set hilight of background button A to false
  329.   set hilight of background button B to true
  330.   set hilight of background button C to false
  331.   set hilight of background button D to false
  332.   put "B" into item group of questans
  333. end mouseUp
  334.  
  335.  
  336.  
  337. -- part 41 (button)
  338. -- low flags: 00
  339. -- high flags: 8005
  340. -- rect: left=14 top=219 right=255 bottom=44
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 1
  344. -- font id: 0
  345. -- text size: 12
  346. -- style flags: 0
  347. -- line height: 16
  348. -- part name: C
  349. ----- HyperTalk script -----
  350. on mouseUp
  351.   global questans, group
  352.   set hilight of background button A to false
  353.   set hilight of background button B to false
  354.   set hilight of background button C to true
  355.   set hilight of background button D to false
  356.   put "C" into item group of questans
  357. end mouseUp
  358.  
  359.  
  360.  
  361. -- part 42 (button)
  362. -- low flags: 00
  363. -- high flags: 8005
  364. -- rect: left=14 top=264 right=300 bottom=44
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 0 / 0
  367. -- text alignment: 1
  368. -- font id: 0
  369. -- text size: 12
  370. -- style flags: 0
  371. -- line height: 16
  372. -- part name: D
  373. ----- HyperTalk script -----
  374. on mouseUp
  375.   global questans, group
  376.   set hilight of background button A to false
  377.   set hilight of background button B to false
  378.   set hilight of background button C to false
  379.   set hilight of background button D to true
  380.   put "D" into item group of questans
  381. end mouseUp
  382.  
  383.  
  384.  
  385. -- part 43 (field)
  386. -- low flags: 81
  387. -- high flags: 0004
  388. -- rect: left=339 top=119 right=137 bottom=498
  389. -- title width / last selected line: 0
  390. -- icon id / first selected line: 0 / 0
  391. -- text alignment: 0
  392. -- font id: 3
  393. -- text size: 12
  394. -- style flags: 256
  395. -- line height: 16
  396. -- part name: review
  397.